<%@ page language="java" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/jsp/pub/include.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人信息管理--<c:choose><c:when test="${empty clazzEntity}">编辑通知信息</c:when><c:otherwise>编辑通知信息</c:otherwise></c:choose></title>
<link href="<%=request.getContextPath() %>/css/admin.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/common.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.form.js"></script>
    <script type="text/javascript">
        function check(){
            var url = getRootPath()+"/user/addusersetting?m=doedit";
            var   huikuan = $("#huikuan").val();
            var   zhichu = $("#zhichu").val();
            var   kaipiao = $("#kaipiao").val();
            var opennotice  = $('input[name="opennotice"]:checked').val();
            var para ={
                'huikuan' :huikuan,
                'zhichu':zhichu,
                'kaipiao':kaipiao,
                'opennotice':opennotice
            }
//            alert(url);
            $.ajax({
                cache:false,
                type:"POST",
                url: url,
                dataType:"json",
                data:para,
                error:function(XMLHttpRequest, textStatus, errorThrown) {
                    alert(XMLHttpRequest.status);
                },
                success:function(returndata){
                    alert(returndata.data.message);
                    if(returndata.data.suc){
                        window.location.href= getRootPath()+"/user/usersetting?m=list";
                    }else{

                    }
                }
            });
        }
</script>
</head>
<body>
<div class="content">
<jsp:include page="../pub/top.jsp"></jsp:include>
<!--头部结束-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="left" valign="top">
<jsp:include page="../pub/left_user.jsp"></jsp:include>
</td>
<td valign="top">
	<div class="right">
	<form id="addUserFrom" action="<c:url value="/user/addusersetting?m=doadd"/>" method="post" onsubmit="return check(this);" style="margin:0">
	<table width="80%" border="0" cellpadding="0" cellspacing="1" bgcolor="#d1d5d8">
	<tr>
	<td height="28" colspan="2" bgcolor="#c6dbf8" class="biaoti" style="padding:0;">
        编辑通知信息
	</td>
	</tr>

	<tr>
	<td width="15%" height="28" align="right" bgcolor="#edf1f7"><span>*</span>回款提醒(天)：</td>
        <td height="28" bgcolor="#FFFFFF">
            <input type="number" name="huikuan" id="huikuan" min="1" value="<c:out value="${userEntity.huikuan}"/>" /></td>
	</tr>
	<tr>
	<td width="15%" height="28" align="right" bgcolor="#edf1f7"><span>*</span>支出提醒(天)：</td>
	<td height="28" bgcolor="#FFFFFF"><input type="number"  min="1"  name="zhichu" id="zhichu" value="<c:out value="${userEntity.zhichu}" />" /></td>
	</tr>

        <tr>
            <td width="15%" height="28" align="right" bgcolor="#edf1f7"><span>*</span>开票提醒(天)：</td>
            <td height="28" bgcolor="#FFFFFF"><input type="number"  min="1"  name="kaipiao" id="kaipiao" value="<c:out value="${userEntity.kaipiao}" />" /></td>
        </tr>
        <tr>
            <td width="15%" height="28" align="right" bgcolor="#edf1f7"><span>*</span>周一邮件提醒：</td>
            <td height="28" bgcolor="#FFFFFF">
                <input type="radio" name="opennotice" value="0"  ${userEntity.opennotice ==0?'checked=checked':''}>开启
                <input type="radio" name="opennotice" value="1"  ${userEntity.opennotice ==1?'checked=checked':''}>关闭
            </td>
        </tr>
	</table>
	<div class="anniu">
	<p><input type="button" value="保存" class="fabu" onclick="check()"/>
	</p>
	</div>
	</form>
	</div>
	<br />
	<br />
</td>
</tr>
</table>
<jsp:include page="../pub/foot.jsp"></jsp:include>
</div>
</body>
</html>
